package com.pervasa.demo.re.impl.data;

public class TFM {

	private int fe;
	private int fr;
	private TimeWindow w;
	private boolean isPercentage;
	
	public TFM(TimeWindow w, int fe, int fr, boolean isPercentage) {
		this.fe = fe;
		this.fr = fr;
		this.w = w;
		this.isPercentage = isPercentage;
		if (isPercentage) {
			fr = (int) (w.getDelay() / fe / 1000);
		}
	}
	
	public int getFe() {
		return fe;
	}

	public int getFr() {
		return fr;
	}

	public TimeWindow getW() {
		return w;
	}

	public boolean isPercentage() {
		return isPercentage;
	}
	
	public String toString() {
		return "<" + w + ", " + fe + ", " + fr + (isPercentage?"%":"") + ">";  
	}
		
}
